package com.hejia.alauda.persistence.mybatis;

import org.apache.ibatis.annotations.Update;

import com.hejia.alauda.entity.Medium;
import com.hejia.alauda.persistence.BaseMapper;

/**
 * 
 * 
 *
 *
 * Created by showone on 2015 下午6:01:45.
 *
 * @Copyright: 2015 www.hejiajinrong.com All rights reserved.
 */
public interface MediumMapper extends BaseMapper<Medium> {
	/**
	 * 设置媒体机构下媒体非置顶，指定的媒体报道除外
	 * 
	 * @param institutionId
	 *            媒体机构ID
	 * @param mediumId
	 *            除外的媒体报道ID
	 * @return
	 */
	@Update("update `medium` set top='down',modifyDate=now() where institution_id=#{0} and id!=#{1}")
	int setTop(Long institutionId, Long mediumId);
}
